import React from 'react'
import { Button } from 'antd'

interface Greeting {
  name: string
  firstName?: string
  lastName?: string
}
//函数组件
const Hello = (props: Greeting) => <Button>hello { props.name }</Button>
// 函数组件 React.FC 自带children 和 语法提示
// 默认属性必须是可选属性
// const Hello: React.FC<Greeting> = (props) => <Button>hello { props.name} </Button>

export default Hello 